[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Math macros
#define sqr(x) ((x) * (x))
#define isgn(x) ((x) < 0 ? -1 : 1)
#define lsgn(x) ((x) < 0l ? -1 : 1)
#define fsgn(x) ((x) < 0.0 ? -1 : 1)
#define sign(x) isgn(x)
#define sgn(x) isgn(x)
#define lsign(x) lsgn(x)
#define fsign(x) fsgn(x)
#define swap(x,y) (x=y, y=x, x=y)
#define mid(a,x,b) ((((a) <= (x)) && ((x) <= (b))) ? 1 : 0)
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson